package com.zy.test.threaddemo;

/**
 * @author MissZhou
 * 第二种：实现Runable类，重新run方法创建
 */
public class CreateByRunable implements Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(i);
        }
    }

    public static void main(String[] args) {
        new Thread(new CreateByRunable()).start();
    }
}
